package cn.iocoder.yudao.module.trade.aftersale.job;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.trade.aftersale.service.ZXHXAfterSaleSyncService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 交易订单的由第三方供应链售后信息 Job
 *
 * @author 山野羡民
 */
@Component("zxhxAfterSaleSyncJob")
public class ZXHXAfterSaleSyncJob implements JobHandler {

    @Resource
    private ZXHXAfterSaleSyncService zxhxAfterSaleSyncService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = zxhxAfterSaleSyncService.autoSync();
        return String.format("供应链售后信息同步 %s 个", count);
    }

}
